/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_DIRD_BACKUP_H_
#define BAREOS_DIRD_BACKUP_H_

namespace directordaemon {

int WaitForJobTermination(JobControlRecord* jcr, int timeout = 0);
bool DoNativeBackupInit(JobControlRecord* jcr);
bool DoNativeBackup(JobControlRecord* jcr);
void NativeBackupCleanup(JobControlRecord* jcr, int TermCode);
void UpdateBootstrapFile(JobControlRecord* jcr);
bool SendAccurateCurrentFiles(JobControlRecord* jcr);
void GenerateBackupSummary(JobControlRecord* jcr,
                           ClientDbRecord* cr,
                           int msg_type,
                           const char* TermMsg);

char* StorageAddressToContact(ClientResource* client, StorageResource* store);
char* ClientAddressToContact(ClientResource* client, StorageResource* store);
char* StorageAddressToContact(StorageResource* read_storage,
                              StorageResource* write_storage);

} /* namespace directordaemon */
#endif  // BAREOS_DIRD_BACKUP_H_
